<article class="cl pd-20">
    <div class="cl pd-5 bg-1 bk-gray">
        <span class="l">
            <a href="javascript:;" onclick="del_all()" class="btn btn-danger radius">
                <i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>

            <a href="javascript:layer_show('添加设备图片', '{:url('/sys/factory/save.html?_layer=true&id=0')}');"
                class="btn btn-success radius">
                <i class="Hui-iconfont">&#xe600;</i> 添加设备图片</a>
            <a href="javascript:layer_show('类别管理', '{:url('/sys/factory/typelist?_layer=true')}', 960);"
                class="btn btn-primary radius">
                <i class="Hui-iconfont">&#xe681;</i> 类别管理</a>
        </span>
    </div>
    <div class="mt-10" style="min-width:800px;">
        <table class="table table-border table-bordered table-bg">
            <thead>
                <tr class="text-c">
                    <th width="2%">
                        <input type="checkbox" name="allcheck">
                    </th>
                    <th width="4%">ID</th>
                    <th width="12%">名称</th>
                    <th width="18%">图片</th>
                    <th width="8%">类别</th>
                    <th width="8%">状态</th>
                    <th width="10%">排序</th>
                    <th width="8%">添加时间</th>
                    <th width="12%">操作</th>
                </tr>
            </thead>
            <tbody>
                {foreach $list as $val}
                <tr class="text-c" style="height: 100px;">
                    <td>
                        <input type="checkbox" value="{$val.id}" name="checkbox[]">
                    </td>
                    <td>{$val.id}</td>
                    <td>{$val.title}</td>
                    <td><a href="{$val.picture}" target="_blank" class="pictureview" style="text-decoration: none;">
                            <img src="{$val.picture}" title="{$val.name}" style="max-height: 90px;">
                        </a></td>
                    <td>{$val.type_name}</td>
                    <td class="td-status">
                        <div class="switch size-S has-switch" data-on-label="启用" data-off-label="停用"
                            data-id="{$val.id}">
                            <input type="checkbox" {if $val.status==1}checked{/if}>
                        </div>
                    </td>
                    <td><input type="text" class="input-text input-sort" value="{$val.sort}" data-id="{$val.id}"
                            style="text-align: center;"></td>
                    <td>{$val.create_time|date='Y-m-d'}</td>
                    <td class="td-manage">
                        <a class="btn btn-primary radius size-S" title="编辑"
                            href="javascript:layer_show('修改设备图片', '{:url('/sys/factory/save.html?_layer=true&id='.$val.id)}');">
                            <i class="Hui-iconfont">&#xe6df;</i>修改
                        </a>
                        <a class="btn btn-danger radius size-S" title="删除" href="javascript:;"
                            onclick="del(this,'{$val.id}')" class="ml-5">
                            <i class="Hui-iconfont">&#xe6e2;</i>删除
                        </a>
                    </td>
                </tr>
                {/foreach}
            </tbody>
        </table>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20 ">
        <span class="r">{notempty name="data"}{$data->render()|raw}{/notempty}</span>
    </div>
</article>